package com.biz.primus.ms.price.dao.po;

import com.biz.primus.ms.base.jpa.po.BaseEntity;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * erp多规格价格信息,只参与记录,不进行实际业务处理
 */
@Data
@Entity
@Table(name = "price_spec",uniqueConstraints = {@UniqueConstraint(columnNames = {"productCode","packageId","depotCode"})})
public class SpecPrice extends BaseEntity implements Serializable {

    @Column(length = 20)
    private String depotCode;

    @Column(length = 20)
    private String productCode;

    /**
     * 多条码
     */
    @Column(length = 50)
    private String barCode;

    /**
     * 包装序列号
     */
    @Column
    private Integer packageId;

    /**
     * 销售规格
     */
    @Column(length = 20)
    private String goodsSpec;

    /**
     * 销售单位
     */
    @Column(length = 20)
    private String unitName;

    /**
     * 件装数
     */
    @Column(nullable = false)
    private Integer packageNumber;

    @Column
    private Integer price;

    /**
     * 上一次更新时间
     */
    @Column
    private Timestamp lastModifyTime;


}
